<template>
  <div>
    <div class="topicList-box">
      <h3>专题精选</h3>
      <van-swipe :loop="false" :width="300" :show-indicators="false">
        <van-swipe-item
          v-for="(item, index) in topicList"
          :key="index"
          :width="270"
        >
          <img :src="item.scene_pic_url" alt="" height="200" width="100%" />
          <h4>
            {{ item.title }} <span>{{ item.price_info | RMBFormat }}</span>
          </h4>
          <p>{{ item.subtitle }}</p>
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script>
export default {
  props: ["topicList"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.topicList-box {
  margin-top: 0.2rem;
  width: 100%;
  text-align: center;
  background-color: #fff;

  h3 {
    font-size: 20px;
    line-height: 0.5rem;
  }

  .van-swipe-item {
    margin-bottom: 0.2rem;
    margin-left: 0.1rem;
    text-align: left;
    img {
      padding-right: 0.1rem;
    }
    h4 {
      width: 90%;
      font-size: 18px;
      line-height: 0.3rem;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      span {
        color: #8b0000;
      }
    }
    p {
      width: 90%;
      font-size: 14px;
      line-height: 0.3rem;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
  }
}
</style>